package com.pro.common.service.admin.enums.init;

import com.pro.common.service.admin.model.db.XxlJobGroup;
import com.pro.framework.api.enums.IEnumToDbEnum;
import com.pro.framework.javatodb.annotation.JTDField;
import com.pro.framework.javatodb.constant.JTDConst;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.time.LocalDateTime;

@Getter
@AllArgsConstructor
@Schema(description = "执行器分组")
public enum EnumXxlJobGroup implements IEnumToDbEnum<XxlJobGroup> {
    _2("goods-launch-shein", "launch-shein", 0, null, null, null),
    _3("sync", "sync", 0, null, null, null),
    _4("goods-launch-temu", "launch-temu", 0, null, null, null),
    _5("shop", "shop", 0, null, null, null),
    _6("goods-launch-tiktok", "aunch-tiktok", 0, null, null, null),
    _7("user", "user", 0, null, null, null),
    _8("goods-collect", "goods-collec", 0, null, null, null),
    _9("user-file", "user-file", 0, null, null, null),
    _10("admin", "admin", 0, null, null, null),
    ;


    @Schema(description = "执行器AppName")
    private final String appName;

    @Schema(description = "执行器名称")
    private final String title;

    @Schema(description = "执行器地址类型：0=自动注册、1=手动录入")
    private final Integer addressType;

    @Schema(description = "执行器地址列表，多地址逗号分隔")
    @JTDField(notNull = JTDConst.EnumFieldNullType.can_null)
    private final String addressList;

    @Schema(description = "更新时间")
    private final LocalDateTime updateTime;

    /**
     * 统一重置修改掉,这个配置时间以前的,旧的配置
     */
    private final String forceChangeTime;
}
